<template>
  <div>
    <el-form label-width="90px" v-if="form.name !== 'SpanLayout'">
      <el-form-item label="组件id">
        <el-input size="small" :readonly="true"  v-model="form.id"/>
      </el-form-item>
      <el-form-item label="组件名称">
        <el-input size="small" clearable v-model="form.title"/>
      </el-form-item>
      <!-- 私有化配置 -->
      <component :is="form.name" v-model="form.props"/>
      <!-- <el-form-item label="必填项">
        <el-switch v-model="form.props.required"></el-switch>
      </el-form-item>
      <el-form-item label="可打印">
        <el-switch v-model="form.props.enablePrint"></el-switch>
      </el-form-item> -->
    </el-form>
    <el-empty v-else description="当前组件不支持配置"></el-empty>
  </div>

</template>

<script>
import components from './component-config-export.js'
export default {
  name: "FormComponentConfig",
  components: components,
  props:{},
  computed:{
    form(){
      return this.$store.state.selectFormItem
    }
  },
  data() {
    return {}
  },
  methods: {}
}
</script>

<style scoped>

</style>
